In recent years, models of imaging devices such as digital cameras on which electronic compasses are mounted appearing. An electronic compass has a function of electronically calculating an azimuth in which a device directly faces, based on the geomagnetism detected by a geomagnetic sensor. By mounting the electronic compass on a digital camera, it is possible to display a two-dimensional compass image showing an azimuth (that is, an azimuth in an image capturing direction) in which the digital camera faces, and makes a camera user recognize the azimuth.
Meanwhile, azimuth information used in an imaging device such as a digital camera is also used for a purpose of recording an azimuth in the image capturing direction (hereinafter, image capturing azimuth) as additional information of a captured image, in addition to a purpose of displaying the above compass image. For example, a digital camera disclosed in Patent Literature 1 superimposes and displays captured azimuth information obtained by an electronic compass, on a captured image displayed on a display unit, and associates and records the captured azimuth information as additional information of the captured image, with the captured image. Further, the digital camera disclosed in Patent Literature 1 has a mechanism which can rotate an image capturing unit with respect to a main body unit, and correct and record image capturing azimuth information obtained by the electronic compass according to a rotating state of the image capturing unit with respect to the main body unit.